package com.aodesoft.pojo;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.directwebremoting.annotations.DataTransferObject;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * DemoReplay entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "DemoReplay")
@DataTransferObject
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class DemoReplay implements java.io.Serializable {

	// Fields

	private Integer id;
	private DemoSns demoSns;
	private String content;
	private Timestamp date;


	/** default constructor */
	public DemoReplay() {
	}

	/** minimal constructor */
	public DemoReplay(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public DemoReplay(Integer id, DemoSns demoSns, String content,
			Timestamp date) {
		this.id = id;
		this.demoSns = demoSns;
		this.content = content;
		this.date = date;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "demoSNS_id")
	public DemoSns getDemoSns() {
		return this.demoSns;
	}

	public void setDemoSns(DemoSns demoSns) {
		this.demoSns = demoSns;
	}

	@Column(name = "content")
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "date", length = 23)
	public Timestamp getDate() {
		return this.date;
	}

	public void setDate(Timestamp date) {
		this.date = date;
	}

}